/**
 * 
 */

function Sort(sortAscClass, sortDescClass){
	this.sortAscClass = sortAscClass;
	this.sortDescClass = sortDescClass;
	this.sortType = null;
	this.currentSortClass = "";
	this.currentSortElement = null;
	
	return this;
}

// ------------------------------------------------------------------------------------------------

Sort.prototype.sort = function(sort, currentSortElement){
	if (this.currentSortElement!=null){
		this.currentSortElement.className = this.currentSortElement.className.replace(this.currentSortClass, "");
	}
	
//	alert("Set Image: " + sort);
	
	switch (sort) {
		case new SortTypes().ascending:
			this.sortType = new SortTypes().ascending;
			this.currentSortClass = this.sortAscClass;
		break;

		case new SortTypes().descending:
			this.sortType = new SortTypes().descending;
			this.currentSortClass = this.sortDescClass;
		break;
		
		default:
			return;
		break;
	}
	
	
	
	this.currentSortElement = currentSortElement;
	this.currentSortElement.className += " " + this.currentSortClass;
};

// ------------------------------------------------------------------------------------------------

